/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InformationDialog.java
 *
 * Created on 26-Jun-2010, 20:03:58
 */

package TimeRecording.forms;

import java.awt.Window;

/**
 *
 * @author david
 */
public class InformationDialog extends javax.swing.JDialog {

    public static void showInformation(Window parent, String title, String information) {
        InformationDialog dlg = new InformationDialog(parent, title, information);
        dlg.setVisible(true);
    }

    /** Creates new form InformationDialog */
    public InformationDialog(Window parent, String title, String information) {
        super(parent, ModalityType.APPLICATION_MODAL);
        initComponents();
        setTitle(title);
        this.information.setText(information);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        informationPane = new javax.swing.JScrollPane();
        information = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(TimeRecording.TimeRecordingApp.class).getContext().getResourceMap(InformationDialog.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        informationPane.setName("informationPane"); // NOI18N

        information.setColumns(20);
        information.setEditable(false);
        information.setFont(resourceMap.getFont("information.font")); // NOI18N
        information.setRows(5);
        information.setName("information"); // NOI18N
        informationPane.setViewportView(information);

        getContentPane().add(informationPane);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-633)/2, (screenSize.height-356)/2, 633, 356);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea information;
    private javax.swing.JScrollPane informationPane;
    // End of variables declaration//GEN-END:variables

}
